
<template>
  <div id="card1">
    <el-card class="box-card">
      <div id="box1">
      <i class="el-icon-success" id="icon1">支付成功</i>
      </div>
      <div  class="text item">
        <i class="el-icon-loading"></i>
        正在自动返回...
      </div>
    </el-card>
  </div>


</template>

<script>

    import Common from "../common/Common";
    import axios from "axios";

    export default {
        name: "PaySuccess",
      data(){
          return{
            href1:""
          }
      },
      methods:{
        getQueryString(Stringname){
          var query = window.location.search.substring(1);
          console.log(query);
          var vars = query.split("&");
          for (var i=0;i<vars.length;i++) {
            var pair = vars[i].split("=");
            if(pair[0] == Stringname){return pair[1];}
          }
          return(false);
            }
          }
      ,
      mounted:function (){
      var harf=this.$route.query.total_amount.toString();
      console.log(harf);
        axios.get(Common.API+'/bond/addbond',{
          params: {
            id: Common.userInfo.id,
            price:harf
          }
        })
          .then(Response=>{
            this.$router.replace("prestore");
          })
      },


    }
</script>

<style scoped>
.text {
  font-size: 20px;
  color: #656b79;
}

.item {
  padding: 18px 0;
}

.box-card {
  width: 480px;
}

  #icon1{
    color: #409EFF;

  }
  #card1{
   text-align: center;
    width: 100%;
  }
  .box-card{
    width: 100%;
  }

  #box1{
    font-size: 40px;
  }
</style>
